import { ajaxGet, ajaxPost } from '@/utils/ajax';

export const uploadVideo = (
  data: {
    file: File,
  }
) => ajaxPost(
  '/uploadmedia',
  {...data},
  {
    baseURL: '/mysite',
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  }
);

export const playVideo = (
  data: {
    path: string,
  }
) => ajaxPost(
  '/playvideo',
  {...data},
  {
    baseURL: '/mysite',
    timeout: 1000
  }
);


export const getGltf = () => ajaxGet(
  '/creategltf',
  {
    baseURL: '/mysite'
  }
);